import request from '@/utils/request'

export const dietList = (search) =>
  request({
    url: '/diet',
    method: 'get',
    params: {
      encode: search.encode,
      offset: search.offset,
      limit: search.limit
    }
  })
export const saveDiet = (diet) =>
  request({
    url: '/diet/add',
    method: 'post',
    data: diet
  })
export const updateDiet = (id, diet) =>
  request({
    url: '/diet/' + id,
    method: 'put',
    data: diet
  })
export const removeDiet = (id) =>
  request({
    url: '/diet/' + id,
    method: 'delete'
  })

